package com.wewins.fota.bean.bo.cond;

import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
@Builder
public class StringRangeCond extends StringCond {
    private String minImei;
    private String maxImei;
    private boolean includeMin;
    private boolean includeMax;

    @Override
    public boolean check(String cond) {
        return (minImei.compareTo(cond) < 0 && maxImei.compareTo(cond) > 0)
                || (includeMin && minImei.equals(cond))
                || (includeMax && maxImei.equals(cond));
    }
}
